class Solution
{
public:
    vector<int> numberOfPairs(vector<int> &nums)
    {
        int numCount[101] = {0};
        for (int num : nums)
        {
            ++numCount[num];
        }
        vector<int> result(2, 0);
        for (int count : numCount)
        {
            result[0] += count / 2;
            result[1] += count % 2;
        }
        return result;
    }
};